package com.heima.Text;

import com.heima.mongo.MonAppliction;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = MonAppliction.class )
public class test1 {

    @Test
    public Integer test(Integer a){
      List<Integer> list = new ArrayList<>();
      int count = 0;
      if (list.size()==0){
          return count;
      }
        for (Integer integer : list) {
            if (integer.equals(a)){
                count ++;
            }
        }
        return count;
     }

}
